package com.gy.zpchat.ui.chat.group;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import androidx.annotation.Nullable;

import com.gy.zpchat.R;

public class ZIMGroupSearchFilterActivity extends Activity {

    public static void actionStart(Activity activity, String groupID, String groupName) {
        Intent intent = new Intent(activity, ZIMGroupSearchFilterActivity.class);
        intent.putExtra("conversationID", groupID);
        intent.putExtra("conversationName", groupName);
        activity.startActivity(intent);
    }

    private static final String TAG = "ZIMGroupSearchFilterActivity";
    private String conversationID;
    private String conversationName;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_group_search_filter);
        conversationID = getIntent().getStringExtra("conversationID");
        conversationName = getIntent().getStringExtra("conversationName");
    }

    public void onGroupSearch(View view) {
        EditText editText = findViewById(R.id.searchEditText);
        ZIMGroupSearchResultsActivity.actionStart(this, conversationID, conversationName,
                                                  editText.getText().toString());
    }
}
